CREATE TABLE userposts(
    pid SERIAL PRIMARY KEY NOT NULL,
    id UUID NOT NULL DEFAULT uuid_generate_v4(),
    post_id INTEGER NOT NULL REFERENCES posts(pid),
    user_id INTEGER NOT NULL REFERENCES users(pid),
    original_url TEXT NOT NULL,
    read BOOL NOT NULL DEFAULT FALSE,
    read_at TIMESTAMP WITH TIME ZONE,
    favorite BOOL NOT NULL DEFAULT FALSE,
    show_real_url BOOL NOT NULL DEFAULT FALSE,
    show_alternative_url BOOL NOT NULL DEFAULT FALSE
);